﻿namespace Logica{
using TUVienna.CS_CUP.Runtime;
%%
%cup
%public
%class soap_scanner
%state cadena

WHITE_SPACE_CHAR=[\n\ \t\b\012]
STRING_TEXT=(\\\"|[^\n\"]|\\{WHITE_SPACE_CHAR}+\\)*

%%

<YYINITIAL> \"{STRING_TEXT}\" {
       return new Symbol(soap_sym.cadena, yytext().Substring(1, yytext().Length - 2));
}

"<"			 { return new Symbol(soap_sym.menorque);   }
">"			 { return new Symbol(soap_sym.mayorque);   }
"="			 { return new Symbol(soap_sym.igual);	  }
"/"			 { return new Symbol(soap_sym.diagonal);   }
"llamada"	 { return new Symbol(soap_sym.llamada);	  }
"funcion"	 { return new Symbol(soap_sym.funcion);    }
"param"		 { return new Symbol(soap_sym.param);	  }
"valor"		 { return new Symbol(soap_sym.valor);      }
"clase"		 { return new Symbol(soap_sym.clase);     }
"tam"		 { return new Symbol(soap_sym.tam);       }

[ \t\r\n\f] { /* ignore white space. */break; }
. { System.Console.Error.WriteLine("Illegal character: "+yytext());break; }
